package com.xbongbong.pro.statistics.service.impl;

import com.xbongbong.config.DataSource;
import com.xbongbong.config.DataSourceNames;
import com.xbongbong.paas.elasticsearch.pojo.StatisticBiFormDataEntity;
import com.xbongbong.paas.toolbox.util.StringUtil;
import com.xbongbong.pro.statistics.service.StatisticBiFormDataService;
import com.xbongbong.saas.model.StatisticBiFormDataModel;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 描述信息
 *
 * @ClassName StatisticBiFormDataServiceImpl
 * @Author 梁鲁江
 * 创建时间 2021/10/15 16:08
 * 修改时间  2021/10/15 16:08
 **/
@Service("statisticBiFormDataService")
public class StatisticBiFormDataServiceImpl implements StatisticBiFormDataService {
    @Resource
    private StatisticBiFormDataModel statisticBiFormDataModel;
    @DataSource(DataSourceNames.CK_DATA)
    @Override
    public List<StatisticBiFormDataEntity> findEntitys(String sql) {
        //TODO
        if(StringUtil.isEmpty(sql)){
            return null;
        }
        return statisticBiFormDataModel.findEntitys(sql);
    }
}
